<template>
  <div class="Processmonitoring_page">
    <div class="page_box">
      <div class="page_content">
        <div class="leftbox">
          <div class="left_box">
            <el-menu
              background-color="rgba(2, 60, 89, 0)"
              text-color="#fff"
              :default-active="'1-1-1'"
            >
              <el-submenu index="1">
                <template slot="title">
                  <div class="custom-collapse-header">
                    <span>分输站</span>
                  </div>
                </template>
                <div class="leftconten">
                  <el-menu-item-group>
                    <el-submenu
                      :index="'1-' + Number(index + 1)"
                      v-for="(item, index) in menus"
                      :key="index"
                    >
                      <template slot="title">{{ item.title }}</template>
                      <el-menu-item
                        :index="
                          '1-' + Number(index + 1) + '-' + Number(indexc + 1)
                        "
                        v-for="(itemc, indexc) in item.children"
                        :key="indexc"
                        >{{ itemc.title }}</el-menu-item
                      >
                    </el-submenu>
                  </el-menu-item-group>
                </div>
              </el-submenu>
            </el-menu>
          </div>
        </div>
        <div class="rightbox">
          <img src="~@/assets/images/testbg1.png" />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      menus: [
        { title: "湘潭实时监控", children: [{ title: "00" }] },
        { title: "大碌实时监控", children: [{ title: "00" }] },
        { title: "道真实时监控", children: [{ title: "00" }] },
        { title: "新舟实时监控", children: [{ title: "00" }] },
        { title: "湘潭实时监控", children: [{ title: "00" }] },
      ],
    };
  },
  methods: {
    handleNodeClick() {},
  },
};
</script>
<style scoped lang="scss">
.Processmonitoring_page {
  width: calc(100% - 40px);
  // padding-top: 51px;
  height: calc(100% - 51px);
  margin-left: 20px;
}
.page_box {
  width: 100%;
  height: 100%;
  background: url("~@/assets/images/content_bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  .page_content {
    margin-left: 30px;
    margin-right: 30px;
    padding: 0;
    padding-top: 31px;
    height: calc(100% - 105px);
    display: flex;
    justify-content: space-between;
    .leftbox {
      margin-right: 20px;
      .leftside {
        display: flex;
        align-items: center;
        padding-left: 17px;
        img {
          width: 16px;
          height: 16px;
          margin-right: 10px;
        }
      }
      .left_box {
        height: 100%;
      }
    }
    .rightbox {
      width: calc(100% - 313px);
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
}
.custom-collapse-header {
  width: 300px;
  height: 48px;
  line-height: 40px;
  text-indent: 16px;
  background-image: url("~@/assets/images/title_bg.png"); /* 替换为你的图片路径 */
  background-size: 300px 48px; /* 背景图片覆盖整个元素 */
  background-repeat: no-repeat;
  color: white;
  font-family: Source Han Sans CN, Source Han Sans CN;
  font-weight: bold;
  font-size: 20px;
  color: #ffffff;
  text-shadow: 0px 0px 9px #158eff;
  text-align: left;
  font-style: normal;
  text-transform: none;
}
/* 使用 /deep/ 或 >>> 来保证样式可以穿透组件边界 */
::v-deep .el-menu {
  .el-menu-item,
  .el-menu--inline .el-submenu__title {
    padding-left: 20px !important;
  }
  .el-menu-item.is-active {
    background-color: rgba(0, 169, 255, 1) !important; /* 你想要的颜色 */
  }
  .el-menu-item:hover,
  .el-submenu__title:hover {
    background: rgba(0, 169, 255, 1) !important;
  }
}
::v-deep .is-active {
  color: white !important;
}

::v-deep .el-submenu__title {
  padding: 0 !important;
}
::v-deep .el-submenu {
  height: 100%;
}
::v-deep .el-menu {
  height: 100%;
  border: none !important;
  li {
    padding: 0 !important;
  }

  /* 改变 el-menu 的右侧箭头颜色为白色 */
  .el-icon-arrow-down:before {
    color: white !important;
  }
}

.leftconten {
  margin-left: 0;
  margin-top: 10px;
  height: 100%;
  overflow-y: auto;
  background-image: url("~@/assets/images/bg2.png"); /* 替换为你的图片路径 */
  background-size: 300px 100%; /* 背景图片覆盖整个元素 */
  background-repeat: no-repeat;
}
</style>